<?php include(VIEWSPATH.'/common/header.php') ?>
<script>
	function search(type){
		window.location = "<?php echo base_url('/product/search')?>?type=" +type;
	}
</script>
<?php  foreach ($info as  $item ){?>
	
	<br><div><span  class ='type_aodai' ><?php  echo $language=="vietnam" ? $item['name'] :$item['name_eng'] ?></span><span class="link_more" onclick="search(<?php echo $item ['id']?>);" class="link_more" ><?php echo lang('more')?> ..</span></div><br>
	<div class="list_aodai">
		<table cellpadding="5" cellspacing="15" class="list_search" align="center">
			<tr>
			<?php foreach ($item['data'] as  $item_child ){?>
				<td align="center" > 
					<div   class= "div_list_image"  >			
						<img class="img_list"  onclick="redirect_page('<?php echo base_url('product/view/').$item_child -> id ?>')" id="img_small_<?php echo $item_child -> id ?>" src="<?php echo base_url('/assets/image/aodai/'. ($item_child -> id %10)."/".$item_child->image ); ?>"></img>
						<div><?php  echo preg_replace("/^(\d+)(\d\d\d)/i", "$1,$2", $item_child -> price);  ?> <span class="money">VNĐ</span></div>
						<div style="margin-bottom:5px;"><span class="button" onclick="redirect_page('<?php echo base_url('product/view/').$item_child -> id ?>')"><?php echo lang('view_detail')?></span><span class="button" onclick="redirect_page('<?php echo base_url('user/giohang')."?ma_aodai=" . $item_child->id ."&giatien=".$item_child->price?>')" ><?php echo lang('buy')?></span></div>
						<div style="padding-left:40px;"><fb:like href="<?php echo base_url('product/view/').$item_child -> id ?>" layout='button_count' send='false' show_faces='false' font="arial" action="like" colorscheme="light" float="center"></fb:like></div>
					</div>						 
				</td>	
			<?php }?>
			</tr>
		</table>
	</div>
	
<?php  }?>

<?php include(VIEWSPATH."/common/footer.php") ?>